<template>
  <div>
    <div class="dataList out-border d-flex justify-content-between layout-top">
      <div class="screen-l">
        <i class="el-icon-tickets"></i>
        <span class="txt">数据列表</span>
      </div>
      <el-button size="mini" @click="() => this.$router.push('/pms/addProduct')">添加</el-button>
    </div>
    <tableData :config="table_config" >
  </div>
</template>
<script>
import tableData from '@/components/common/table_template/index.vue'
export default {
  name: 'ReturnPeason',
  data() {
    return {
      // 表格配置
      table_config: {
        thead: [
          {
            label: '编号',
            prop: 'id',
          },
          {
            label: '原因类型',
            prop: 'name',
          },
          {
            label: '排序',
            prop: 'sort',
          },
          {
            label: '是否可用',
            prop: 'productRealPrice',
            type: 'function',
            callback: (row) => {
              return `￥${row.productRealPrice}`
            },
          },
          {
            label: '添加时间',
            prop: 'createTime',
            type: 'function',
            callback: (row) => {
              return handlerStatus.putIn_status[row.status].status
            },
          },
          {
            label: '操作',
            type: 'operation',
            default: {
              deleteBtn: true,
              detailsBtn: {
                status: false,
                path: '/oms/returnApplyDetail',
              },
              editBtn:true
            },
          },
        ],
        url: 'returnReason/list',
        paging: true,
        batchhandler: true,
      },
    }
  },
  methods: {},
  components:{tableData}
}
</script>
<style lang="scss" scoped>
.dataList {
  padding: 18px 20px;
}
</style>
